package com.demo.exce;

/**
 * @Author WaveHi
 * @Date 26/7/2021 下午 3:50
 * @Version 1.0
 * @Contact HJBWaveHi@163.com
 * @Description break演示
 */
public class BreakDemo {

    public static void main(String[] args) {

        //循环输出数字，遇到4停止
        for(int i = 1;i <= 10;i++){

            //判断
            if(i == 4){
                break;
            }
            System.out.println(i);

        }

    }

}
